package com.vueblog.webapi.controller;


import com.vueblog.webapi.response.BaseResponse;
import com.vueblog.webapi.service.ITagService;
import com.vueblog.webapi.service.ITypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author luosj
 * @since 2021-05-15
 */
@Controller
@CrossOrigin
@RequestMapping("/show/tags")
public class ShowTagController extends BaseController {

    @Autowired
    private ITagService tagService;

    /**
     * 获取标签对应博客数量列表
     */
    @GetMapping("/blogCount")
    @ResponseBody
    public BaseResponse getTagBlogCountList() {
        return tagService.getTagBlogCountList();
    }
}
